// Variables

$accordion-border: 3px solid $color-gray-lightest;

// Accordion Styles

.usa-accordion,
.usa-accordion-bordered {

  + .usa-accordion,
  + .usa-accordion-bordered {
    margin-top: 1rem;
  }

  > ul {
    color: $color-base;
    margin: 0;
    padding: 0;
    width: 100%;

    > li {
      background-color: $color-gray-lightest;
      font-family: $font-sans;
      list-style: none;
      margin-bottom: 6px;
      width: 100%;
    }
  }

  button[aria-expanded=false] {
    background-image: url('../img/plus.png');
    background-image: url('../img/plus.svg');
    background-repeat: no-repeat;
    background-size: 1.3rem;
  }

  button {
    background-color: $color-gray-lightest;
    background-image: url('../img/minus.png');
    background-image: url('../img/minus.svg');
    background-position: right 3rem center;
    background-repeat: no-repeat;
    background-size: 13px;
    color: $color-base;
    cursor: pointer;
    display: inline-block;
    font-family: $font-sans;
    margin: 0;
    padding: {
      bottom: 1.5rem;
      left: 3rem;
      right: 5.5rem;
      top: 1.5rem;
    }
    width: 100%;

    &:focus {
      box-shadow: $focus-shadow;
    }

    &:hover {
      background-color: $color-gray-lighter;
      color: $color-base;
    }

    h1, h2, h3, h4, h5, h6 {
      margin: 0;
    }
  }
}

.usa-accordion-bordered {
  .usa-accordion-content {
    border: {
      bottom: $accordion-border;
      left: $accordion-border;
      right: $accordion-border;
    }
  }
}

.usa-accordion-content {
  display: block;
  background-color: white;
  overflow: auto;
  padding: 3rem;

  > *:first-child {
    margin-top: 0;
  }

  > *:last-child {
    margin-bottom: 0;
  }
}
